home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / javax / management / StandardEmitterMBean.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  2.6 KB  |  76 lines

  1. package javax.management;
  2.  
  3. public class StandardEmitterMBean extends StandardMBean implements NotificationEmitter {
  4.    private final NotificationEmitter emitter;
  5.    private final MBeanNotificationInfo[] notificationInfo;
  6.  
  7.    public <T> StandardEmitterMBean(T var1, Class<T> var2, NotificationEmitter var3) {
  8.       super(var1, var2, false);
  9.       if (var3 == null) {
  10.          throw new IllegalArgumentException("Null emitter");
  11.       } else {
  12.          this.emitter = var3;
  13.          this.notificationInfo = var3.getNotificationInfo();
  14.       }
  15.    }
  16.  
  17.    public <T> StandardEmitterMBean(T var1, Class<T> var2, boolean var3, NotificationEmitter var4) {
  18.       super(var1, var2, var3);
  19.       if (var4 == null) {
  20.          throw new IllegalArgumentException("Null emitter");
  21.       } else {
  22.          this.emitter = var4;
  23.          this.notificationInfo = var4.getNotificationInfo();
  24.       }
  25.    }
  26.  
  27.    protected StandardEmitterMBean(Class<?> var1, NotificationEmitter var2) {
  28.       super(var1, false);
  29.       if (var2 == null) {
  30.          throw new IllegalArgumentException("Null emitter");
  31.       } else {
  32.          this.emitter = var2;
  33.          this.notificationInfo = var2.getNotificationInfo();
  34.       }
  35.    }
  36.  
  37.    protected StandardEmitterMBean(Class<?> var1, boolean var2, NotificationEmitter var3) {
  38.       super(var1, var2);
  39.       if (var3 == null) {
  40.          throw new IllegalArgumentException("Null emitter");
  41.       } else {
  42.          this.emitter = var3;
  43.          this.notificationInfo = var3.getNotificationInfo();
  44.       }
  45.    }
  46.  
  47.    public void removeNotificationListener(NotificationListener var1) throws ListenerNotFoundException {
  48.       this.emitter.removeNotificationListener(var1);
  49.    }
  50.  
  51.    public void removeNotificationListener(NotificationListener var1, NotificationFilter var2, Object var3) throws ListenerNotFoundException {
  52.       this.emitter.removeNotificationListener(var1, var2, var3);
  53.    }
  54.  
  55.    public void addNotificationListener(NotificationListener var1, NotificationFilter var2, Object var3) {
  56.       this.emitter.addNotificationListener(var1, var2, var3);
  57.    }
  58.  
  59.    public MBeanNotificationInfo[] getNotificationInfo() {
  60.       return this.notificationInfo;
  61.    }
  62.  
  63.    public void sendNotification(Notification var1) {
  64.       if (this.emitter instanceof NotificationBroadcasterSupport) {
  65.          ((NotificationBroadcasterSupport)this.emitter).sendNotification(var1);
  66.       } else {
  67.          String var2 = "Cannot sendNotification when emitter is not an instance of NotificationBroadcasterSupport: " + this.emitter.getClass().getName();
  68.          throw new ClassCastException(var2);
  69.       }
  70.    }
  71.  
  72.    MBeanNotificationInfo[] getNotifications(MBeanInfo var1) {
  73.       return this.getNotificationInfo();
  74.    }
  75. }
  76.